from string import replace
import sys

def parseAsia():
    f = open('asia.dat')

    nodes = f.readline()
    nodes = replace(nodes, '"', "'")
    splited = nodes.split(" ")
    # nodes
    for s in splited:
        sys.stdout.write(s + ", ")

    # values
    sys.stdout.write("\n")
    for line in f:
        splittedLine = line.split(" ")
        print '[',
        for i in range(1,9):
            value = splittedLine[i]
            left = value.find('"')
            right = value.rfind('"')
            v = value[left+1:right]
            if v == 'yes':
                sys.stdout.write('True')
            else:
                sys.stdout.write('False')
            if i != 8:
                print ', ',
        print "],"

def parseCoronary():
    f = open('coronary.dat')

    nodes = f.readline()
    nodes = replace(nodes, '"', "'")
    splited = nodes.split(" ")
    # nodes
    for s in splited:
        sys.stdout.write(s + ", ")

    # values
    sys.stdout.write("\n")
    for line in f:
        splittedLine = line.split(" ")
        print '[',
        for i in range(1,7):
            value = splittedLine[i]
            left = value.find('"')
            right = value.rfind('"')
            v = value[left+1:right]
            if v == 'yes' or v == '>140' or v == '>3' or v == 'pos':
                sys.stdout.write('True')
            else:
                sys.stdout.write('False')
            if i != 6:
                print ', ',
        print "],"

def parseCoronary():
    f = open('winter1000.txt')

    nodes = f.readline()
    splited = nodes.split("\t")
    # nodes
    for s in splited:
        sys.stdout.write(s + ", ")

    # values
    sys.stdout.write("\n")
    for line in f:
        splittedLine = line.split("\t")
        print '[',
        for i in range(0,5):
            value = splittedLine[i]
            value = value.strip()
            if value == 'true':
                sys.stdout.write('True')
            else:
                sys.stdout.write('False')
            if i != 4:
                print ', ',
        print "],"

parseCoronary()